const path = require('path')
const { dependencies } = require('../../package.json')
const merge = require('webpack-merge')
const baseConfig = require('./base.config')

let mainConfig = merge(baseConfig, {
    entry: {
        main: path.join(__dirname, '../../src/main/index.js')
    },
    externals: [
        ...Object.keys(dependencies || {})
    ],
    output: {
        path: path.join(__dirname, '../../dist/electron')
    },
    resolve: {
        extensions: ['.js', '.json', '.node']
    },
    target: 'electron-main'
})

// Adjust mainConfig for development settings
if (process.env.NODE_ENV !== 'production') {
    
} else {

}

module.exports = mainConfig
